Re: Referencing multiple primary keys from a single - Mailing list pgsql-novice

From Daniel Staal
Subject Re: Referencing multiple primary keys from a single
Date
Msg-id 27042678.1064251404@[192.168.1.52]
Whole thread Raw
In response to Re: Referencing multiple primary keys from a single table.  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-novice
--On Monday, September 22, 2003 15:05 -0700 Stephan Szabo
<sszabo@megazone.bigpanda.com> wrote:


> This isn't multiple primary keys, it's a single primary key with
> 3 columns.

Ah, I wasn't sure how to refer to it.

>> Then I have another table that needs to reference Table1 with a
>> foreign key.  What I really want to do is:
>> Table2:
>> field1 Primary key
>> field2 references table1
>
> What are you actually trying to do here?  field2 is a single column
> and you're referencing a 3 column key, so I'm not sure what behavior
> you're looking for.

Simple: I'm looking for a way to use one field in Table2 to refer to
one row in Table1.  (Instead of using 3.)

I think you've actually answered my question though.  The tone of the
response made me realize I was thinking like my program which
interchanges field1.T1:field2.T1:field3.T1 with other readings of the
serial number...  (In other words: I'm trying to do something which
is a dumb idea in the first place.  The best thing to do is not to do
it.)

Thanks for giving my brain the jolt it needed.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

pgsql-novice by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Referencing multiple primary keys from a single table.
Next
From: Bruno Wolff III
Date:
Subject: Re: Referencing multiple primary keys from a single table.